// 日看板
export const DailyReport = {
    title: {
        text: '日报表',
        left: 'center',
    },
    grid: {
        left: '3%',
        right: '3%',
        bottom: "0%",
        containLabel: true
    },
    tooltip: {
        trigger: 'axis',
        axisPointer: {
            type: 'cross',
            crossStyle: {
                color: '#999'
            }
        }
    },
    toolbox: {
        feature: {
            dataView: {show: true, readOnly: false},
            magicType: {show: true, type: ['line', 'bar']},
            restore: {show: true},
            saveAsImage: {show: true}
        }
    },
    legend: {
        data: ['产能', 'OEE', '目标'],
        top: '20px'
    },
    xAxis: [
        {
            type: 'category',
            data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
            axisPointer: {
                type: 'shadow'
            }
        }
    ],
    yAxis: [
        {
            type: 'value',
            // name: 'Precipitation',
            min: 0,
            max: 250,
            interval: 50,
            axisLabel: {
                formatter: '{value} %'
            }
        },
        {
            type: 'value',
            // name: 'Temperature',
            min: 0,
            max: 2000,
            interval: 500,
            axisLabel: {
                formatter: '{value} '
            }
        }
    ],
    series: [
        {
            name: '产能',
            type: 'bar',
            tooltip: {
                valueFormatter: function (value) {
                    return value;
                }
            },
            itemStyle: {
                color: '#347974',
            },
            data: [
                2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3
            ]
        },
        {
            name: 'OEE',
            type: 'line',
            itemStyle: {
                color: '#ff8c65',
            },
            tooltip: {
                valueFormatter: function (value) {
                    return value;
                }
            },
            data: [
                2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3
            ]
        },
        {
            name: '目标',
            type: 'line',
            itemStyle: {
                color: '#934761',
            },

            yAxisIndex: 1,
            tooltip: {
                valueFormatter: function (value) {
                    return value + ' %';
                }
            },
            data: [2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2]
        }
    ]
};

// 小时看板
export const HourlyReport = {
    title: {
        text: '小时看板',
        left: 'center',
    },
    tooltip: {
        trigger: 'axis',
        axisPointer: {
            type: 'cross',
            crossStyle: {
                color: '#999'
            }
        }
    },
    toolbox: {
        feature: {
            dataView: {show: true, readOnly: false},
            magicType: {show: true, type: ['line', 'bar']},
            restore: {show: true},
            saveAsImage: {show: true}
        }
    },
    grid: {
        left: '3%',
        right: '3%',
        bottom: "0%",
        containLabel: true
    },
    legend: {
        data: ['产量', 'OEE'],
        top: '20px'
    },
    xAxis: [
        {
            type: 'category',
            data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
            axisPointer: {
                type: 'shadow'
            }
        }
    ],
    yAxis: [
        {
            type: 'value',
            // name: 'Precipitation',
            min: 0,
            max: 35,
            interval: 5,
            axisLabel: {
                formatter: '{value} %'
            }
        },
        {
            type: 'value',
            // name: 'Temperature',
            min: 0,
            max: 100,
            interval: 10,
            axisLabel: {
                formatter: '{value} '
            }
        }
    ],
    series: [
        {
            name: '产量',
            type: 'bar',
            itemStyle: {
                color: '#ff8c65',
            },
            tooltip: {
                valueFormatter: function (value) {
                    return value;
                }
            },
            data: [
                2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3
            ]
        },
        {
            name: 'OEE',
            type: 'line',
            itemStyle: {
                color: '#ffc4a2',
            },
            tooltip: {
                valueFormatter: function (value) {
                    return value;
                }
            },
            data: [
                2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3
            ]
        }
    ]
};

// 停机时间分析 - 左
export const StoppageTimeAnalysisLeft = {
    title: {
        text: '停机时间分析(实时、二级菜单)',
        left: 'center'
    },
    legend: {
        left: "right",
        top: '25%',
        bottom: 'auto',
        orient: "vertical",
    },
    toolbox: {
        show: false,
        feature: {
            mark: {show: true},
            dataView: {show: true, readOnly: false},
            restore: {show: true},
            saveAsImage: {show: true}
        }
    },
    series: [
        {
            name: 'Nightingale Chart',
            type: 'pie',
            radius: '60%',
            center: ['50%', '50%'],
            itemStyle: {
                borderRadius: 8
            },
            data: [
                {value: 40, name: 'rose 1'},
                {value: 38, name: 'rose 2'},
                {value: 32, name: 'rose 3'},
                {value: 30, name: 'rose 4'},
                {value: 28, name: 'rose 5'},
                {value: 26, name: 'rose 6'},
                {value: 22, name: 'rose 7'},
                {value: 18, name: 'rose 8'}
            ]
        }
    ]
};

// 停机时间分析 - 右
export const StoppageTimeAnalysisRight = {
    legend: {
        top: '50px',
        width: "50%"
    },
    toolbox: {
        show: false,
        feature: {
            mark: {show: true},
            dataView: {show: true, readOnly: false},
            restore: {show: true},
            saveAsImage: {show: true}
        }
    },
    series: [
        {
            name: 'Nightingale Chart',
            type: 'pie',
            radius: '50%',
            center: ['50%', '60%'],
            itemStyle: {
                borderRadius: 8
            },
            data: [
                {value: 40, name: 'rose 1'},
                {value: 38, name: 'rose 2'},
                {value: 32, name: 'rose 3'},
                {value: 30, name: 'rose 4'},
                {value: 28, name: 'rose 5'},
                {value: 26, name: 'rose 6'},
                {value: 22, name: 'rose 7'},
                {value: 18, name: 'rose 8'}
            ]
        }
    ]
};

// 性能稼动率
export const PerformanceOEE = {
    title: '性能稼动率',
    left: {
        time: {
            label: "稼动时间",
            value: "180min(实时)"
        },
        TCapacity: {
            label: "理论产能",
            value: "720"
        },
        ACapacity: {
            label: "实际产能",
            value: "500(实时)"
        },
        TheoreticalCT: {
            label: "理论CT",
            value: "15s"
        },
        ActualCT: {
            label: "实际CT",
            value: "58s"
        },
    },
    right: {
        APerformance: {
            label: "累计性能",
            value: ""
        },
        performance1: {
            label: "稼动率",
            value: "69%"
        },
        IPerformance: {
            label: "瞬时性能",
            value: ""
        },
        performance2: {
            label: "稼动率",
            value: "26%"
        },
    }
}